<template>
    <van-address-edit
  :area-list="areaList"
  show-delete
  show-set-default
  show-search-result
  :search-result="searchResult"
  :area-columns-placeholder="['请选择', '请选择', '请选择']"
  @save="onSave"
  @delete="onDelete"
  @change-detail="onChangeDetail"
/>


  </template>
  
  <script setup>
  import { ref } from 'vue';
  import { AddressEdit } from 'vant';
  import { showToast } from 'vant';
  
  
  const searchResult = ref([]);

const onSave = () => showToast('save');
const onDelete = () => showToast('delete');
const onChangeDetail = (val) => {
  if (val) {
    searchResult.value = [
      {
        name: '',
        address: '',
      },
    ];
  } else {
    searchResult.value = [];
  }
};





  </script>
  
  <style>
  .van-cell {
    height: 50px;
  }
  </style>